home *** CD-ROM | disk | FTP | other *** search
/ Champak 66 / Vol 66.iso / games / doodle_d.swf / scripts / frame_4 / DoAction_9.as < prev    next >
Text File  |  2013-04-24  |  2KB  |  61 lines

  1. function shield()
  2. {
  3.    if(shieldLevel == 1)
  4.    {
  5.       if(shieldStart != true)
  6.       {
  7.          shieldMC.moveTo(_root.ship._x,_root.ship._y);
  8.          shieldMC.lineStyle(6,"0x0000FF",100);
  9.          shieldStart = true;
  10.       }
  11.       if(shieldTimer < shieldAmount && dx + dy != 0)
  12.       {
  13.          shieldTimer++;
  14.          shieldMC.lineTo(_root.ship._x,_root.ship._y);
  15.       }
  16.    }
  17.    if(shieldLevel == 2)
  18.    {
  19.       if(shieldStart != true)
  20.       {
  21.          shieldMC.moveTo(_root.ship._x,_root.ship._y);
  22.          shieldMC.lineStyle(8,"0x0000FF",100);
  23.          shieldStart = true;
  24.       }
  25.       if(shieldTimer < shieldAmount && dx + dy != 0)
  26.       {
  27.          shieldTimer++;
  28.          shieldMC.lineTo(_root.ship._x,_root.ship._y);
  29.       }
  30.    }
  31.    if(shieldLevel == 3)
  32.    {
  33.       if(shieldStart != true)
  34.       {
  35.          shieldMC.moveTo(_root.ship._x,_root.ship._y);
  36.          shieldMC.lineStyle(6,"0xFF0000",100);
  37.          shieldStart = true;
  38.       }
  39.       if(shieldTimer < shieldAmount && dx + dy != 0)
  40.       {
  41.          shieldTimer++;
  42.          shieldMC.lineTo(_root.ship._x,_root.ship._y);
  43.       }
  44.    }
  45.    if(shieldLevel == 4)
  46.    {
  47.       if(shieldStart != true)
  48.       {
  49.          shieldMC.moveTo(_root.ship._x,_root.ship._y);
  50.          shieldMC.lineStyle(8,"0xFF0000",100);
  51.          shieldStart = true;
  52.       }
  53.       if(shieldTimer < shieldAmount && dx + dy != 0)
  54.       {
  55.          shieldTimer++;
  56.          shieldMC.lineTo(_root.ship._x,_root.ship._y);
  57.       }
  58.    }
  59. }
  60. shieldLevel = 1;
  61.